﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Backend/AdminLayout.master" AutoEventWireup="true"
	CodeFile="Default.aspx.cs" Inherits="Admin_Product_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminElegantFood" runat="Server">
	<div class="panel-heading">
		<h3 class="panel-title">
			<span class="glyphicon glyphicon-th-large"></span>គ្រប់គ្រងមុខម្ហូប
		</h3>
	</div>
	<div class="panel-body">
		<efx:CreateToolBar ID="toolbar" runat="server" DestinateUrl="Backend/Product/Add.aspx" />
		<!-- div class="form-inline">
			<div class="form-group">
				<asp:TextBox ID="searchName" runat="server" pattern=".{3,150}" ToolTip="Allow enter 3 to 150 characters" CssClass="form-control input-sm" placeholder="ឈ្មោះ" />
			</div>
			<div class="form-group">
				<asp:TextBox ID="searchPrice" runat="server" pattern=".{1,3}" ToolTip="Allow enter 1 to 3 character(s)"
					CssClass="form-control input-sm" placeholder="តម្លៃ" />
			</div>
			<div class="form-group">
				<asp:TextBox ID="searchCategory" runat="server" CssClass="form-control input-sm" placeholder="ប្រភេទ" />
			</div>
			<asp:Button ID="searchSubmit" runat="server" CssClass="btn btn-warning btn-sm" Text="ស្វែងរក" />
		</div -->
		<br />
		<asp:Label ID="displayMessage" runat="server"></asp:Label>
		<br />
		<asp:GridView ID="ProductList" runat="server" AutoGenerateColumns="false" 
			GridLines="None" CssClass="table table-striped table-hover table-product" 
			onrowdeleting="ProductList_RowDeleting" 
			onrowcancelingedit="ProductList_RowCancelingEdit" 
			onrowediting="ProductList_RowEditing" onrowupdating="ProductList_RowUpdating">
			<Columns>
				<asp:BoundField DataField="No" HeaderText="ល.រ" ReadOnly="true" 
					HeaderStyle-Width="50">
<HeaderStyle Width="50px"></HeaderStyle>
				</asp:BoundField>
				<asp:BoundField DataField="ProductID" HeaderStyle-CssClass="sr-only" ReadOnly="true"
					ItemStyle-CssClass="sr-only" HeaderText="ID" />
				<asp:BoundField DataField="ProductImage" HeaderText="រូបភាព" HeaderStyle-Width="100" HtmlEncode="false" ReadOnly="true" />
				<asp:BoundField DataField="Name" HeaderText="ឈ្មោះ" />
				<asp:BoundField DataField="Price" DataFormatString="{0:c}" HeaderText="តម្លៃ" HeaderStyle-Width="80" />
				<asp:BoundField DataField="Promotion" HeaderText="លក់ពិសេស" HeaderStyle-Width="80" />
				<asp:BoundField DataField="HightLight" HeaderText="ទំព័រមុខ" HeaderStyle-Width="80" />
				<asp:BoundField DataField="Status" HeaderText="បង្ហាញ" HeaderStyle-Width="80" />
				<asp:BoundField DataField="CreateDate" HeaderText="ថ្ងៃបង្កើត" ReadOnly="true" HeaderStyle-Width="100" />
				<asp:TemplateField HeaderText="Action" HeaderStyle-Width="80">
					<ItemTemplate>
						<asp:LinkButton ID="ProductDelete" runat="server" CommandName="Delete" ToolTip="លុប"
							OnClientClick='return confirm("Are you sure you want to delete?")'><span class="glyphicon glyphicon-trash"></span></asp:LinkButton>
						<asp:LinkButton ID="ProductEdit" runat="server" CommandName="Edit" ToolTip="កែប្រែ"><span class="glyphicon glyphicon-edit"></span></asp:LinkButton>
					</ItemTemplate>
					<EditItemTemplate>
						<asp:LinkButton ID="ProductUpdate" runat="server" CommandName="Update" ToolTip="រក្សាទុក"><span class="glyphicon glyphicon-floppy-disk"></span></asp:LinkButton>
						<asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel"
							ToolTip="បោះបង់"><span class="glyphicon glyphicon-remove-sign"></span></asp:LinkButton>
					</EditItemTemplate>

<HeaderStyle Width="70px"></HeaderStyle>
				</asp:TemplateField>
			</Columns>
		</asp:GridView>
		<efx:Pagination ID="BottomPagination" runat="server" Visible="false" />
	</div>
</asp:Content>
